﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Brain.Photon
{
    public class BoundingBoxArea : SpawnArea
    {
        /// <summary>
        /// The Area the Particle can spawn in
        /// </summary>
        public BoundingBox SpawnArea;

        public BoundingBoxArea(Vector3 min, Vector3 max)
        {
            SpawnArea = new BoundingBox(min, max);
        }
        public BoundingBoxArea(Vector2 min, Vector2 max)
        {
            SpawnArea = new BoundingBox(new Vector3(min, 0), new Vector3(max, 0));
        }

        public override Vector3 GetParticlePosition(Vector3 centerPosition)
        {
            return RandomUtil.RandomVector3(SpawnArea.Min, SpawnArea.Max, 100) + centerPosition;
        }
    }
}
